exports.sendFile = function(address, port, file, data)
{
	var options =
	{
	    cert: fs.readFileSync('cert.pem'),
	    ca: fs.readFileSync('cert.pem'),
	    port: item.port,
	    host: item.addres
	};	

	var client = this;

	client.socket = tls.connect(options, function()
	{
	    if (client.socket.authorized)
	    {
	        sys.puts("Auth success, connected to TLS server");
	    } else {
	        sys.puts("Failed to auth TLS connection: ");
	        sys.puts(client.socket.authorizationError);
	    }

	    client.socket.write(JSON.stringify({
	    	file : file,
	    	content: data
	    }));
	});
}